/*
 * Copyright (C) 2013 Michael
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

package com.jm.xporta.plugin;

import com.jm.xporta.XPortException;
import javax.swing.filechooser.FileFilter;

/**
 *
 * @created Feb 12, 2013
 * @author Michael L.R. Marques
 */
public interface XPort {
    
    /**
     * Initializes the plugin with the @code{ResultSet} data
     * This will tell the plugin to start
     * @param results 
     * @throws com.jm.xporta.XPortException 
     */
    public void initialize(java.sql.ResultSet results) throws XPortException;
    
    /**
     * 
     * @return 
     */
    public String getName();
    
    /**
     * 
     * @return 
     */
    public String getDescription();
    
    /**
     * 
     * @return 
     */
    public java.sql.ResultSet getData();
    
    /**
     * 
     * @param output 
     * @throws com.jm.xporta.XPortException 
     */
    public void setOutput(Object output) throws XPortException;
    
    /**
     * 
     * @return 
     */
    public Object getOutput();
    
    /**
     * 
     * @return 
     */
    public FileFilter[] getFileFilters();
    
    /**
     * 
     * @param max 
     */
    public void setProgressMaximum(int max);
    
    /**
     * 
     * @param min 
     */
    public void setProgressMinimum(int min);
    
    /**
     * 
     * @param value 
     */
    public void setProgressValue(int value);
    
    /**
     * 
     * @return 
     */
    public int getProgressValue();
    
    /**
     * 
     * @throws com.jm.xporta.XPortException
     */
    public void export() throws XPortException;
    
    /**
     * 
     * @param done 
     */
    public void done(boolean done);
    
    /**
     * 
     * @return 
     */
    public boolean isDone();

}
